<!--
 * @Author: yuandawei
 * @Date: 2020-11-12 10:03:33
 * @LastEditTime: 2020-11-12 13:43:52
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue-admin-beautiful-pro-template\src\components\HH-modal.vue
-->
<template>
  <transition name="slide">
    <div v-show="showModal" class="modal">
      <div class="mask"></div>
      <div class="modal-dialog">
        <div class="modal-header">
          <span class="title">{{ title }}</span>
          <span class="el-icon-close icon" @click="$emit('cancel')"></span>
        </div>
        <div class="modal-body">
          <slot name="body"></slot>
        </div>
        <div class="modal-footer">
          <el-button type="primary" @click="$emit('confirm')">确定</el-button>
          <el-button @click="$emit('cancel')">取消</el-button>
        </div>
      </div>
    </div>
  </transition>
</template>

<script>
  export default {
    props: {
      title: {
        type: String,
        default: '',
      },
      showModal: {
        type: Boolean,
        default: false,
      },
    },
  }
</script>

<style lang="scss">
  @import './styles/modal.scss';
</style>
